package com.example.xcService.pojo.task;

import com.example.entity.AgentOrder;
import com.example.xcService.pojo.tool.OrderTool;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class NoticeTask implements  Runnable{
    private final OrderTool orderTool;

    private final AgentOrder order;

    public NoticeTask(AgentOrder order,OrderTool orderTool) {
        this.order = order;
        this.orderTool=orderTool;
    }

    @Override
    public void run() {
        try {
            orderTool.Notice(order);
        } catch (Exception e) {
            log.error("回调订单出错：",e);
        }
    }
}
